<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>右浮动</title>
    <style>
        div{
            width: 100px;
            height: 100px;
        }
        .red{
            background: red;
            float: right;
        }
        .green{
            background: green;
            float: right;
        }
        .blue{
            background: blue;
            float: right;
        }
    </style>
</head>
<body>
    <div class="red"></div>
    <div class="green"></div>
    <div class="blue"></div>
</body>
</html>